package com.example.admindatasource.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 文件上传表
 * </p>
 *
 * @author author
 * @since 2021-05-11
 */
@TableName("sys_upload_file")
@ApiModel(value="SysUploadFile对象", description="文件上传表")
public class SysUploadFile implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "文件名称")
    @TableField("file_name")
    private String fileName;

    @ApiModelProperty(value = "文件原始名称")
    @TableField("origin_file_name")
    private String originFileName;

    @ApiModelProperty(value = "请求地址")
    @TableField("location")
    private String location;

    @ApiModelProperty(value = "上传地址  （相对路径）")
    @TableField("file_path")
    private String filePath;

    @ApiModelProperty(value = "文件类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "文件大小 单位byte")
    @TableField("size")
    private long size;

//    @ApiModelProperty(value = "模块名称")
//    @TableField("module")
//    private String module;

    @ApiModelProperty(value = "状态 1正常 3删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "状态 1原始文件 2 追加的文件")
    @TableField("origin_append_status")
    private Integer originAppendStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人")
    @TableField("create_id")
    private Integer createId;

    public Integer getOriginAppendStatus() {
        return originAppendStatus;
    }

    public void setOriginAppendStatus(Integer originAppendStatus) {
        this.originAppendStatus = originAppendStatus;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    public String getOriginFileName() {
        return originFileName;
    }

    public void setOriginFileName(String originFileName) {
        this.originFileName = originFileName;
    }
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Override
    public String toString() {
        return "SysUploadFile{" +
                "id=" + id +
                ", fileName='" + fileName + '\'' +
                ", originFileName='" + originFileName + '\'' +
                ", location='" + location + '\'' +
                ", filePath='" + filePath + '\'' +
                ", type='" + type + '\'' +
                ", size=" + size +
                ", status=" + status +
                ", createTime=" + createTime +
                ", createId=" + createId +
                '}';
    }
}
